<?php
	include "../../public/commom/config.php";
	include "../lock1.php";		
?>

<!DOCTYPE html>
<html>
	
	<head>
		<meta charset="UTF-8">
		<title></title>
		<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.1.0/css/bootstrap.min.css">
		<link rel="stylesheet" type="text/css" href="../public/css/index.css"/>
	</head>
	
	<body>
		<div class="container">
			<h1>添加品牌</h1>
			<form class="form-inline" action="addbrand1.php" method="post">
				<label>
					品牌名称：
					<input type="text" class="form-control" name="name" placeholder="请输入名称.." autocomplete="off" />
				</label>
				<div class="form-group">
					<label>
						品牌分类：
						<select class="form-control" name="class_id">
							<?php
								$sql = "SELECT * FROM class";
							
								$result = mysqli_query($conn, $sql);
								
								while($row = mysqli_fetch_array($result)) {
									echo "<option value=" . $row["id"] . ">" . $row["name"] . "</option>";
								}
								
								mysqli_close($conn);
							?>
						</select>
					</label>
				</div>
				<input type="submit" class="btn btn-primary" value="添加"/>
			</form>
		</div>
	</body>
	
</html>